project('EventClient', 'c', version: '0.1.beta')

prefix = get_option('prefix')
bindir = get_option('bindir')
datadir = get_option('datadir')
desktopdir = join_paths(datadir, 'applications')
includedir = get_option('includedir')
libdir = get_option('libdir')
localedir = get_option('localedir')
docdir = datadir / 'doc'

i18n = import('i18n')
add_project_arguments('-DGETTEXT_PACKAGE="EventClient"', language: 'c')

application_id = 'org.korack.event'

conf = configuration_data()
conf.set_quoted('GETTEXT_PACKAGE', meson.project_name())
conf.set_quoted('LOCALEDIR', join_paths(prefix, localedir))
conf.set_quoted('PACKAGE_VERSION', meson.project_version())

config_h = declare_dependency(
  sources: vcs_tag(
    command: ['git', 'rev-parse', '--short', 'HEAD'],
    input: configure_file(output: 'config.h.in', configuration: conf),
    output: 'config.h',
  ),
)

subdirs = ['po', 'src', 'data']

foreach dir : subdirs
  subdir(dir)
endforeach
